function s(){
    let li = document.querySelectorAll(".text1 li");
    let all = document.querySelector("#zongjia");
    let allnum = 0;
    for(let i = 0; i<li.length; i++){
        var Price = li[i].children[2].children[0].innerHTML;
        var num = li[i].children[3].children[0].value;
        var total =li[i].children[4].children[0].innerHTML = (Price * num).toFixed(2);
        allnum += Number(total);
    }
    all.innerHTML = allnum.toFixed(2);
}
s();
let num_all = document.querySelectorAll(".youhuop .youhuo");
for(let k = 0; k < num_all.length; k++){
    num_all[k].addEventListener('change',s)
}
let del_all = document.querySelectorAll(".text1 .del");
for(let j = 0; j<del_all.length; j++){
    del_all[j].addEventListener('click',function(){
        this.parentNode.parentNode.removeChild(this.parentNode);
        s();
    })
}

































